package com.splic.product.service;

import com.splic.product.domain.User;
import com.splic.product.dto.ThirdLoginDto;
import me.chanjar.weixin.common.bean.WxOAuth2UserInfo;
import me.chanjar.weixin.common.bean.oauth2.WxOAuth2AccessToken;
import me.chanjar.weixin.common.error.WxErrorException;

/**
 * ==========================
 * 开发：singe
 * 创建时间：2022-03-10 22:38
 * 版本: 1.0
 * 描述：TODO
 * ==========================
 */
public interface ThirdLoginService {

    public WxOAuth2AccessToken getAccessToken(String code) throws WxErrorException;

    public WxOAuth2AccessToken refreshToken(String accessToken) throws WxErrorException;

    public WxOAuth2UserInfo getUserInfo(WxOAuth2AccessToken accessToken) throws WxErrorException;

    User thirdQuickLogin(String code, String thirdType, String thirdUserId, Integer isMerge) throws WxErrorException;

    User checkQQLogin(String deviceIdentify);

    User skipBindLogin(String thirdUserId, String thirdUserType, String code);

    void qqNotify(String code, String deviceIdentify, String thirdUserId, Integer isMerge);

    User checkThirdUserIdIsBindAccount(String thirdType, String thirdUserId);

    void loginLimitCheck(User userOld);

    void limitLogin(ThirdLoginDto dto, User user, Integer isForce);
}
